@model CooWork.Models.Department

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.DepartmentName)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.DepartmentName)
    @Html.ValidationMessageFor(model => model.DepartmentName)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.parentId)
</div>
<div class="editor-field">
    @Html.Action("ddl" , "department", new { parentId =Model==null ?-1:Model.parentId,name= "parentId" })
    @Html.ValidationMessageFor(model => model.parentId)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.DepartmentDesc)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.DepartmentDesc)
    @Html.ValidationMessageFor(model => model.DepartmentDesc)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Leader)
</div>
<div class="editor-field">
    @Html.Action("ddl", "Account", new { userid = Model == null ? "" : Model.Leader.ToString(), name = "Leader" })
    @Html.ValidationMessageFor(model => model.Leader)
</div>

